<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:au="http://java.sun.com/jsf/composite/autocomplete"
                xmlns:pe="http://primefaces.org/ui/extensions">


    <ui:define name="content">
        <h:outputStylesheet library="css" name="printing.css"></h:outputStylesheet>

        <h:panelGroup rendered="true" >
            <h:form>


                <p:panel id="panelPrint"  
                         header="Turn Around Time">

                    <h:panelGrid columns="2" style="min-width: 50%;" styleClass="noPrintButton">
                        <h:outputLabel value="Bill Type"/>
                        <p:selectOneMenu value="#{investigationMonthSummeryOwnControllerSession.summeryType}" >
                            <f:selectItem itemValue="1" itemLabel="All Bill Types" />
                            <f:selectItem itemValue="2" itemLabel="Collecting Center Bill" />
                            <f:selectItem itemValue="3" itemLabel="OPD Bill" />
                            <f:selectItem itemValue="4" itemLabel="Inward Bill" />
                            <f:selectItem itemValue="5" itemLabel="OPD + Inward Bill" />
                        </p:selectOneMenu>
                        <h:outputLabel value="Investigation"/>
                        <p:autoComplete widgetVar="aPt" id="acPt" forceSelection="true" converter="ixcon"
                                        value="#{investigationMonthSummeryOwnControllerSession.item}" 
                                        completeMethod="#{investigationController.completeInvest}" 
                                        var="apt" itemLabel="#{apt.name}" placeholder="Investigation"
                                        itemValue="#{apt}" size="30"  style="width: 400px;">
                            <p:column>
                                #{apt.name}
                            </p:column>
                            <p:column>
                                #{apt.fullName}
                            </p:column>
                            <p:column>
                                #{apt.department.name}
                            </p:column>

                        </p:autoComplete> 
                        <h:outputLabel value="Department"/>
                        <au:department value="#{investigationMonthSummeryOwnControllerSession.department}" />

                        <h:outputLabel value="From"/>
                        <p:calendar id="frmDate" styleClass="dateTimePicker" value="#{investigationMonthSummeryOwnControllerSession.fromDate}" pattern="dd MMMM yyyy HH:mm:ss" >
                        </p:calendar>

                        <h:outputLabel value="To"/>
                        <p:calendar id="toDate" styleClass="dateTimePicker" value="#{investigationMonthSummeryOwnControllerSession.toDate}" pattern="dd MMMM yyyy HH:mm:ss" >
                        </p:calendar>

                        <h:outputLabel value=""/>
                        <h:panelGroup>
                            <p:commandButton ajax="false"  value="Process"  
                                             action="#{investigationMonthSummeryOwnControllerSession.createInvestigationTurnoverTime}"
                                             styleClass="noPrintButton" style="float: left;" />

                            <p:commandButton value="Back" ajax="false" styleClass="noPrintButton" action="/reportLab/lab_summeries_index" >
                            </p:commandButton> 
                        </h:panelGroup>
                    </h:panelGrid>

                    <p:panel style="width: 500px; margin-top: 20px;">

                        <h:outputLabel style="font-size: 15pt!important; color: red;" value="Average Turn Around Time for #{investigationMonthSummeryOwnControllerSession.item.name} is " ></h:outputLabel>
                        <h:outputLabel style="font-size: 15pt!important; color: red;" value="#{investigationMonthSummeryOwnControllerSession.totalCount}" ></h:outputLabel>
                        <h:outputLabel style="font-size: 15pt!important; color: red;" value=" minutes." ></h:outputLabel>

                    </p:panel>



                </p:panel>        
            </h:form>
        </h:panelGroup>
    </ui:define>

</ui:composition>
